package racing.car;

/**
 * RacingCar class. The car has its status which are speed, booster speed,
 * booster cooldown and booster time.
 * 
 * @author Sarathit Sangtaweep 5510546182
 * @author Veerapat Teeravipark 5510547022
 * @version 2013
 */
public class RacingCar {

	private String name;
	private int speed;
	private int boosterSpeed;
	private int boosterCooldown;
	private int boosterTime;

	/**
	 * Constructor of the class.
	 * @param name the name of the car.
	 * @param status the array of the car's status.
	 */
	public RacingCar(String name, Integer[] status) {
		this.name = name;
		this.speed = status[0];
		boosterSpeed = status[1];
		boosterCooldown = status[2];
		boosterTime = status[3];
	}

	/**
	 * Get the name of the car.
	 * @return the name of the car.
	 */
	public String getName() {
		String cutNumName = name.replace(name.toCharArray()[0], ' ');
		return cutNumName;
	}

	/**
	 * Get the name of the car with number.
	 * @return the name of the car with number.
	 */
	public String getNameWithNum() {
		return name;
	}

	/**
	 * Get the speed of the car.
	 * @return the speed of the car.
	 */
	public int getSpeed() {
		return speed;
	}

	/**
	 * Get the booster speed of the car.
	 * @return the booster speed of the car.
	 */
	public int getBoosterSpeed() {
		return boosterSpeed;
	}

	/**
	 * Get the booster cooldown of the car.
	 * @return the booster cooldown of the car.
	 */
	public int getBoosterCooldown() {
		return boosterCooldown;
	}

	/**
	 * Get the booster time of the car.
	 * @return the booster time of the car.
	 */
	public int getBoosterTime() {
		return boosterTime;
	}
}
